"""
@Time ： 2021/10/19 20:38
@Auth ： ChenZhangKun
"""


class Animal:
    def __init__(self, name):
        self.name = name

    def eat(self):
        print("%s会吃饭" % self.name)


class Dog(Animal):

    def shout(self):
        print("%s会犬吠" % self.name)


class XiaoTian(Dog):
    def fly(self):
        print("%s会飞" % self.name)

    def shout(self):
        # 调用父类的方法
        super().shout()
        # 另一种调用方式
        Dog.shout(self)
        print("%s天上飞" % self.name)


dog = XiaoTian("哮天犬")
dog.shout()
